Import diddy
Import angelfont
Import gamescreens
Import gameglobals
Import udts
#MOJO_IMAGE_FILTERING_ENABLED="false"
#rem
Monkey works so completely different than freebasic that retaining the orignal loop will not
work properly, also since i am loading from xml and unlumped resources many of the original loading functions have been 
consolidated into the RPGXML loader.

My Goal however is to retain as much of the original gameplay style as possible.

#end

Function Main:Int()
	New MyGame()
	Return 0
End

Class MyGame Extends DiddyApp




	Method Create:Void()
		
		drawFPSOn = True
		
		'Begin Loading the Game
		
		LoadGameData()
		'check rpgxml for version
		SetScreenSize(320, 200)
		CreateMenus()
		Print "Screen: "+SCREEN_WIDTH
		'MAIN SCREEN TURN ON
		
		'change this to Addhero function	
		MainPlayer = New HeroWalkabout(diddyGame.images.Find("walkabout_0"), SCREEN_WIDTH2, SCREEN_HEIGHT2)
		MainPlayer.x = SCREEN_WIDTH2'MainGame.gdata[genStartX]*20
		MainPlayer.y = SCREEN_HEIGHT2'MainGame.gdata[genStartY]*20		
		CURRENTMAPX = (MainGame.gdata[genStartX]*20)-SCREEN_WIDTH2
		CURRENTMAPY = (MainGame.gdata[genStartY]*20)-SCREEN_HEIGHT2		
		'CURRENTMAPX = MainGame.gdata[genStartX]'-(SCREEN_WIDTH2/2)'+SCREEN_WIDTH
		'CURRENTMAPY = MainGame.gdata[genStartY]'+(SCREEN_HEIGHT2/2)
		'IF titlescreen() = NO THEN EXIT DO	
		Start(titleScreen)
		
		
		
	End
	
	Method LoadGameData()
		MainGame = New RPGXML
		MainGame.LoadGameData()
	end

	Method CreateMenus()
		titleScreen = New TitleScreen
		gameScreen = New MapScreen
	End	
	
End	